# 配置langchain chat模型、url、api key等

from langchain_openai import ChatOpenAI
from langchain.prompts import ChatPromptTemplate
from langchain.schema import StrOutputParser
from langchain.schema.runnable import Runnable
from langchain.memory import ConversationBufferMemory
from typing import Dict, Any
from ..config import settings

# 基础模型配置
llm = ChatOpenAI(
    api_key=settings.DASHSCOPE_API_KEY,
    base_url=settings.DASHSCOPE_BASE_URL,
    model=settings.DASHSCOPE_MODEL,
    temperature=0.7,
    max_tokens=4096
)